package com.mike.spring.Basic;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;

public class MyFileApplicationContext extends AbstractXmlApplicationContext {
    public MyFileApplicationContext(String configLocation){
        this(new String[]{configLocation},null);
    }
    public MyFileApplicationContext(String[] configLocations, ApplicationContext parent) {
        super(parent);
        this.setConfigLocations(configLocations);
        this.refresh();
    }
    protected Resource getResourceByPath(String path) {
        return new FileSystemResource("/Users/will/git/knowledge/系统学习/spring系统学习/spring/src/main/resources/com/mike/spring/Basic/beans2.xml");
    }
}
